package com.myjar.excel.serializer;

import org.apache.poi.ss.usermodel.Cell;

public class ShortCodec implements ObjectSerializer<Short> {

    final static ShortCodec instance = new ShortCodec();

    @Override
    public void write(Cell cell, Short aShort) {
        cell.setCellValue(aShort);
    }

    @Override
    public Short read(Cell cell) {
        return Short.parseShort(cell.getNumericCellValue() + "");
    }
}
